﻿using System;
using System.Data;
using System.Configuration;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Runtime.Serialization;

namespace AppServices
{
	[DataContract]
	public class OrderDetailsClass
	{
		/// <summary>
		/// Create a new Order_Details object.
		/// </summary>
		/// <param name="discount">Initial value of Discount.</param>
		/// <param name="orderID">Initial value of OrderID.</param>
		/// <param name="productID">Initial value of ProductID.</param>
		/// <param name="quantity">Initial value of Quantity.</param>
		/// <param name="unitPrice">Initial value of UnitPrice.</param>
		public OrderDetailsClass(Order_Details orderDetailes)
		{
			Discount = orderDetailes.Discount;
			Order = new OrdersClass(orderDetailes.Orders);
			Product = new ProductsClass(orderDetailes.Products);
			Quantity = orderDetailes.Quantity;
			UnitPrice = orderDetailes.UnitPrice;
		}

		[DataMember]
		public float Discount
		{
			get;
			set;
		}

		[DataMember]
		public OrdersClass Order
		{
			get;
			set;
		}

		[DataMember]
		public ProductsClass Product
		{
			get;
			set;
		}

		[DataMember]
		public short Quantity
		{
			get;
			set;
		}
		
		[DataMember]
		public decimal UnitPrice
		{
			get;
			set;
		}
	}
}
